#pragma once

#define TlsMap std::map<std::string, LPVOID>
#define LPTlsMap TlsMap*

namespace ISAPI_Python {
	
	namespace Win32Helpers {

		class ThreadLocalStorage {
		protected:
			DWORD TlsIndex;
			DWORD Init();
			ThreadLocalStorage();

		private:
			ThreadLocalStorage(const ThreadLocalStorage& otherThreadLocalStorage);
			ThreadLocalStorage& operator = (const ThreadLocalStorage& otherThreadLocalStorage);

		public:
			virtual ~ThreadLocalStorage() throw();
			
			TlsMap& Data() const;
			static ThreadLocalStorage& Current();
		};
	}
}